{extend name="layout:home" /}
{block name="container"}
<form class="layui-form layui-form-pane" method="post">
    <div class="layui-tab layui-tab-card">
        <script src="{$Think.ADMIN_SITE_ROOT}/js/column.js"></script>
        {include file="layout/admin_items" /}
        <div class="layui-tab-content page-tab-content">
            <table class="layui-table lay-even">
                <colgroup>
                    <col width="300">
                    <col width="300">
                    <col>
                </colgroup>
                <thead>
                <tr>
                    <th>{$Think.lang.column_name}</th>
                    <th class="w48">{:lang('ds_no_order')}</th>
                    <th>所属模块</th>
                    <th>{$Think.lang.ds_operation}</th>
                </tr>
                </thead>
                <tbody>
                {notempty name="column_list"}
                {volist name="column_list" id="column"}
                <tr>
                    <td>
                        {if $column.have_child == '1'}
                        <img src="{$Think.ADMIN_SITE_ROOT}/images/treetable/tv-expandable.gif" fieldid="{$column.column_id}"
                             status="open" ds_type="flex">
                        {else /}
                        <img fieldid="<?php echo $column['column_id'];?>" status="close" ds_type="flex"
                             src="{$Think.ADMIN_SITE_ROOT}/images/treetable/tv-item.gif">
                        {/if}
                        {$column.column_name}
                        <a class='btn-add-nofloat marginleft' href="{:url('column/add',['parent_id'=>$column.column_id])}">
                            <span>{:lang('ds_add_sub_class')}</span>
                        </a>
                    </td>
                    <td>
                        <span title="{:lang('ds_editable')}" ajax_branch='column' datatype="number" fieldid="{$column.column_id}"
                              fieldname="column_order" ds_type="inline_edit" class="editable">{$column.column_order}</span>
                    </td>
                    <td>
                        <span>{$column.column_module}-{$column_module_list[$column.column_module]}</span>
                    </td>
                    <td>
                        <a href="javascript:dsLayerOpen('{:url('Column/edit',['id'=>$column.column_id])}','{$Think.lang.ds_edit}-{$column.column_name}')"  class="layui-btn layui-btn-xs"><i class="layui-icon layui-icon-edit"></i>{$Think.lang.ds_edit}</a>
                        <a href="javascript:dsLayerConfirm('{:url('Column/del',['id'=>$column.column_id])}','{$Think.lang.ds_confirm_cancel}')" class="layui-btn layui-btn-xs layui-btn-danger"><i class="layui-icon layui-icon-delete"></i>{$Think.lang.ds_del}</a>
                    </td>
                </tr>
                {/volist}
                {else}
                <tr class="no_data">
                    <td colspan="10">{$Think.lang.ds_no_record}</td>
                </tr>
                {/notempty}
                </tbody>
            </table>
        </div>
    </div>
</form>
<script type="text/javascript" src="{$Think.ADMIN_SITE_ROOT}/js/jquery.edit.js"></script>
{/block}
